Directory of this series:
Introduction to palm web OS
Build a development environment in one of palm Application Development
Palm application development 2: Learning from helloworld
Overview
The root directory of the application folder contains an appinfo. JSON file. This file contains a javascript JSON object. If the application is a multi-language version, you must configure your own localized appinfo
local plist and is saved in a name called appinfomodel
array of c3>. and then back to the controller 's Viewdidload method, The program executes appinfoview *appview = [Appinfoview appinfoviewwithappinfo:self.applist[i]]; (view layer) This sentence passed in a parameter self.applist[i], This parameter is the model, which is stored in the applist array, by subscript Determines that this is a model that exists in the plist . and the method Appinfoviewwithappinfo: very simple, the function
through @ Resource. Because I only define a bean OF THE jdbcTemplate type, you can omit the name parameter and @ Resource here, or use @ Autowired to create a corresponding Dao derived class for the table app in the database.
/** * Created by Ant on 2015/1/1. */@Repositorypublic class AppDao extends AntSoftDaoBase{ private Logger logger = LoggerFactory.getLogger(getClass()); private static final String TABLE_NAME = "app"; private static final String COLUMN_NAMES = "name, user_id, title
list of apps installed on a mobile phone is displayed to the user.
Is the principle simple? Next, let's implement these functions together.II. Implementation 1. Create the AppInfo object class of the application
In order to better target and embody the object-oriented encapsulation, I encapsulated every application information I obtained into a java object, this object contains information such as the application icon, name, version number, package n
and pass the appropriate predicatesfilter()Function to obtain the expected value.
In the previous chapterloadList()The function can be changed to the following:
private void loadList(List apps) { mRecyclerView.setVisibility(View.VISIBLE); Observable.from(apps) .filter((appInfo) -> appInfo.getName().startsWith("C")) .subscribe(new Observable() { @Override public void onCompleted() {
Use AsyncTask to load the app information that has been installed on the mobile phone, and asynctask to load
Recently, a small feature in the project is to use ListView to display the installed app information on the mobile phone. I found a Demo on the Internet (thanks to the sharer of the demo ), then, according to your own needs, I changed the code and posted the code. I will take a note:
--------------- The application information Bean ------------------------
Public class
Obtains information about all applications on the mobile phone.
When managing the mobile phone software, we often need to know some basic information about the mobile phone software, such as the type, location, uid, and so on of the application, so that we can perform corresponding operations.
The following is the key code for getting all the software installed on the mobile phone:
/*** Entity class of application information */public class AppInfo {
Learn how to get the mobile phone program list and program-related information and start the specified program
:
Program list:
Start the program and obtain the program information:
The Code is as follows:
Create an AppInfo class to represent the application
Public class AppInfo {public CharSequence title; // program name public CharSequence packageName; // package name Intent intent; // start Inten
, especially the level parameter and the final string STR parameter passed each time, these two parameters are very important. First, the string is null, And the prefix specifies the initial prefix. The level is 1. The array elements are traversed, and each element determines whether it is an array. If it is not an array, the string is directly pieced together, if it is an array, the block name is used. After level is increased by 1, the array is recursive. After the array is completed, level 1
1. Basic Ideas
①. Create a database with a locked application (field: _id,packagename), and if the application is locked, maintain the lock-applied package name into the database
②. Lock + unlocked = All applications in mobile phone (appinfoprovider)
2. Locked and unlocked data adapters
Class Myadapter extends baseadapter{private Boolean islock; /** * @param islock is used to differentiate between locked and unlocked applications. Lock data adapter False Unlocked data adapter */Public My
Android project: Mobile Security Guard (16)-complex ListView AnalysisAndroid project: Mobile Security Guard (16)-Introduction to complicated ListView1
Next, the content of yesterday will continue to improve the Application List today. First, applications are divided into system applications and user applications. The installation location is divided into mobile phone memory and sdcard. Therefore, we add a category in ListView, it can be divided into system applications and user applications. Eac
most of them are in this case.
android:icon ="@drawable/ic_launcher" android:label ="@string/app_name"
We only need to overwrite the icon image of the corresponding name under drawable-* and modify strings under the values-* path. the attribute value corresponding to the name in XML is enough. For the sake of simplicity, the drawable-hdpi and values-ZH-RCN paths are introduced here.
Androidmanifest. XML parsing through the above introduction, we need to get the values of
When looking at UAC-related things, I found that I still don't know about its internal logic. To facilitate the subsequent work, I had to understand it. After reading some materials all day today, I have probably understood the logic, but it is still quite complicated. I 'd like to forget it here:
1. Run
Program Explorer calls shellexecuteex (), and shellexecuteex () Further calls CreateProcess () to create a process. Because this process requires administrator privileges to run, CreateProcess
YYjia cms front-end filtering is lax, resulting in injection #2
YYjia cms front-end filtering is lax, resulting in injection #2I looked at this file and found that there are still vulnerabilities:
Elseif ($ caozuo = "delapp") {$ uploadid = $ _ GET ['id']; $ lx = $ _ GET [lx]; $ SQL = "delete from user_data where zxid = '". $ uploadid. "'and type = '2'"; $ _ SGLOBAL ['db']-> query ($ SQL); $ SQL = "select * from ". tname ('appinfo '). "where id = $ u
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.